package com.headline.service;

import com.headline.common.PageObject;
import com.headline.dao.UserDao;
import com.headline.model.UserEntity;

import java.util.List;

/**
 * Created with Administrator
 * DATE:2016/11/4
 * Time:17:00
 */
public class UserService {
//    @Autowired
//    UserDao userDao;


    UserDao userDao = new UserDao();

    public int insertUser(UserEntity userEntity) {
        return userDao.insertUser(userEntity);
    }

    public List<UserEntity> queryList(String strWhere) {
        return userDao.queryList(strWhere);
    }

    public UserEntity queryUserById(int id) {
        return userDao.queryUserById(id);
    }

    public int updateUser(UserEntity userEntity) {

        return userDao.updateUser(userEntity);
    }

    public int deleteUserById(int id) {
        return userDao.deleteUserById(id);
    }

    public PageObject queryPage(String strWhere, int pageIndex, int pageSize) {
        return userDao.queryPage(strWhere, pageIndex, pageSize);

    }

}
